home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 1999 November / maximum-cd-1999-11.iso / Utilities / Automation / WinWizard Pro / Sample - Conditional IFVAL Statement.wz_ / Sample - Conditional IFVAL Statement.wz
Encoding:
Text File  |  1998-11-20  |  1.3 KB  |  46 lines

  1. {SPEED} 1
  2. {TITLE} Conditional Operation Test
  3. {DO} 
  4. {DISPLAY} 
  5. {DISPLAY} This is an example of the IF Statement which allows you to make decisions based on user response. You will be asked to select a number between 1 and 5, once selected, you will be displayed the results.
  6. {DISPLAYADD} 
  7. {DISPLAYADD} Press ENTER, the SPACE BAR or click RUN...
  8. {PAUSE} 
  9. {INPUT} Enter a Number between 1 and 5...
  10. {IFVAL} {VARIABLE} = 1 {THEN} Selected1
  11. {IFVAL} {VARIABLE} = 2 {THEN} Selected2
  12. {IFVAL} {VARIABLE} = 3 {THEN} Selected3
  13. {IFVAL} {VARIABLE} = 4 {THEN} Selected4
  14. {IFVAL} {VARIABLE} = 5 {THEN} Selected5
  15. {IFVAL} {VARIABLE} < 1 {THEN} ErrorLessThan
  16. {IFVAL} {VARIABLE} > 5 {THEN} ErrorGreaterThan
  17. {SLEEP} 5
  18. {CANCEL} Would you like to try again?
  19. {LOOP} 
  20. {END} 
  21. {SUB} ErrorLessThan
  22. {DISPLAYADD} Your entry was less than 1...
  23. {RETURN} 
  24. {SUB} ErrorGreaterThan
  25. {DISPLAYADD} Your entry was Greater Than 5...
  26. {RETURN} 
  27. {SUB} ReRunScript
  28. {SCRIPT} Sample Conditional.wzd
  29. {RETURN} 
  30. {SUB} Selected1
  31. {DISPLAYADD} You Selected 1!
  32. {RETURN} 
  33. {SUB} Selected2
  34. {DISPLAYADD} You Selected 2!
  35. {RETURN} 
  36. {SUB} Selected3
  37. {DISPLAYADD} You Selected 3!
  38. {RETURN} 
  39. {SUB} Selected4
  40. {DISPLAYADD} You Selected 4!
  41. {RETURN} 
  42. {SUB} Selected5
  43. {DISPLAYADD} You Selected 5!
  44. {RETURN} 
  45. {END}
  46.